package com.ruoyi.project.syl_Sxl.syldept.service.impl;

import com.ruoyi.project.syl_Sxl.syldept.domain.SylDept;
import com.ruoyi.project.syl_Sxl.syldept.mapper.SylDeptMapper;
import com.ruoyi.project.syl_Sxl.syldept.service.ISylDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SylDeptServiceImpl implements ISylDeptService {
    @Autowired
    private SylDeptMapper sylDeptMapper;
    /*
    * 根据条件查询科室
    * */
    @Override
    public List<SylDept> selectList(SylDept sylDept) {
        List<SylDept> list = sylDeptMapper.selectList(sylDept);
        return list;
    }

    @Override
    public int insertDept(SylDept sylDept) {
        int i = sylDeptMapper.insertDept(sylDept);
        return i;
    }

    @Override
    public SylDept selectById(Long deptId) {
        return sylDeptMapper.selectById(deptId);
    }

    @Override
    public int updateDept(SylDept sylDept) {
        return sylDeptMapper.updateDept(sylDept);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return sylDeptMapper.deleteByIds(ids);
    }

    @Override
    public List<SylDept> selectAll() {
        return sylDeptMapper.selectAll();
    }
}
